package main.java.com.gdkj.enums;

/**
 * 顶级富翁国家枚举
 *
 * @author: zw
 * @date: 2023/3/6
 **/
public enum RichManLevelTypeEnums {
    SD(1, "书店"),
    CT(2, "餐厅"),
    FZD(3, "服装店"),
    XD(4, "鞋店"),
    DQSC(5, "电器商城"),
    HL(6, "画廊"),
    ZBD(7, "珠宝店"),
    XZL(8, "写字楼"),
    QC4D(9, "汽车4S店"),
    JB(10, "酒吧");


    private Integer code;

    private String name;

    RichManLevelTypeEnums(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByCode(Integer type){
        RichManLevelTypeEnums[] enums = RichManLevelTypeEnums.values();
        for (RichManLevelTypeEnums enums1 : enums){
            if(enums1.code.equals(type)){
                return enums1.name;
            }
        }
        return null;
    }
}
